package com.softtown.modules.dapai.dao;

import com.softtown.common.dao.BaseDao;
import com.softtown.modules.dapai.dto.CompServiceOrderAPPDTO;
import com.softtown.modules.dapai.dto.CompServiceOrderDTO;
import com.softtown.modules.dapai.entity.CompServiceOrderDetailEntity;
import com.softtown.modules.dapai.entity.CompServiceOrderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface CompServiceOrderDao extends BaseDao<CompServiceOrderEntity> {

    List<CompServiceOrderDTO> getServiceOrderPageList(@Param("compId")Long compId,@Param("pram") String pram );

    CompServiceOrderEntity getServiceOrderById(@Param("compId")Long compId, @Param("id")Long id);

    List<CompServiceOrderAPPDTO> getServiceOrderPageListAPP(@Param("compId")Long compId, @Param("pram") String pram );

    CompServiceOrderAPPDTO getServiceOrderByIdAPP(@Param("compId")Long compId, @Param("id")Long id);

    List<CompServiceOrderDetailEntity> getServiceOrderDetailList(@Param("compId")Long compId, @Param("id")Long id);

    void deleteServiceOrder(@Param("compId")Long compId, @Param("id")Long id);

    void deleteDetail(@Param("compId")Long compId, @Param("id")Long id);

    void submitServiceOrderAPP(@Param("compId")Long compId, @Param("id")Long id, @Param("distribution")int distribution);

    void updateAfterSaleOrderDistributionAPP(@Param("compId")Long compId, @Param("id")Long id, @Param("distribution")int distribution);

}
